{% extends "manager/base.html" %}

{% block content %}
    <h2>{{ table_desc }}</h2>
    
    <form method="post">
        {% csrf_token %}
        {% for d in data %}
        <div class="mb-3">
            <label for="{{ d.0 }}" class="form-label">{{ d.0 }}</label>
            <input type="text" class="form-control" id="{{ d.0 }}" name="{{ d.0 }}" 
                   value="{{ d.1 }}" required>
        </div>
        {% endfor %}
        
        <button type="submit" class="btn btn-primary">保存</button>
        <a href="{% url 'table_detail' table_name=table_name %}" class="btn btn-secondary">取消</a>
    </form>
{% endblock %}